package com.optimize1;

import sun.nio.cs.ext.TIS_620;

import javax.naming.Name;

/**
 * Time    : 2023/3/22 15:26
 * Author  : 王摇摆
 * FileName: LandVehicle.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class LandVehicle {
    private String name;

    public LandVehicle(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //该方法是实例方法，通过类对象进行调用
    public void run() {
        System.out.println(this.getName() + "可以在陆地上行驶！");
    }
}
